Repository navigation
Conversation
284km
left a comment
There was a problem hiding this comment.
Reviewed d325094 against e45622a. I found no actionable issues in this change.
Clearing the detached copy's inherited capture marker is consistent with its lack of a parent link. Routing cleanup through blk_env_put also preserves genuinely captured frames and registers them for later collection. All three scratch-scope call sites now release their temporary on success and failure.
Validation:
- Built the exact PR head at O2 with pinned Mere compiler
991f299b. - Ran
unittest/scratch_scope_check.py: fresh frame counts were 3 / 3 at 100 / 10,000 iterations, with hash indexing ON and OFF. - Additional probes matched Ruby 4.0.9 for assignment results, short-circuiting, getter/setter/comparison exceptions (including exception identity and
$!), retained bindings and procs after frame reuse and GC, and nonlocalreturn,break, andthrow. These passed with indexing ON/OFF, both normally and withMERE_RUBY_GC_STRESS=100. - Checked CI run
42368677643for this exact head: 522/522 corpus programs matched Ruby; the new allocation regression passed on macOS and Linux. Some comprehensive test shards are still queued or running, so this is not a claim that the entire suite has completed.
Posting as COMMENT because the authenticated reviewer is also the PR author.
|
Thanks for checking exception identity, nonlocal control flow, and retained bindings/procs under GC stress in addition to the allocation regression. No changes are needed for this review. The CI Hash shard has now completed all 306 tests below the memory limit (678,896 KiB peak RSS); the remaining single timeout reproduces on the baseline. I am waiting for the remaining shards and final report before marking this ready. |
|
Final validation for The report retains 17 MEMORY_LIMIT files and 161 incomplete/zero-test files overall. I investigated the Module limit, which was absent from the earlier The review has no actionable findings and its threads are resolved. Marking this PR ready. #38 depends on this branch and is still being validated separately. |
Temporary scopes for comparisons and attribute/index updates inherited the surrounding frame's capture marker. A closure holding the parent therefore prevented unrelated temporary copies from returning to the frame pool. Exceptions could also bypass cleanup entirely. Repeated expressions eventually exhausted the CI memory budget.
Clear inherited capture identity on detached copies, retain and register genuine captures, and use a shared cleanup path on both normal return and failure. Add a workload that checks values, closure lifetime and original exceptions, plus a macOS/Linux CI check that verifies frame allocations remain bounded as the iteration count grows.
Validation:
TestHashOnly#test_broken_hash_valueexceeded the 2 GiB limit on maine45622a; the fix passes both assertions in 31.9 seconds with 269,344 KiB peak process-family RSS.test_replace_memory_leaktimeout also reproduces on main; this is not a claim of full Hash compatibility.